/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Shared Source License
* for DSL Editor PowerToy. A copy of the license can be found in the License.htm file
* at the root of this distribution. If you can not locate the Shared Source License
* for DSL Editor PowerToy, please obtain a copy from: http://www.codeplex.com/dsltreegrideditor/Project/License.aspx.
* By using this source code in any fashion, you are agreeing to be bound by
* the terms of the Shared Source License for DSL Editor PowerToy.
*
* You must not remove this notice, or any other, from this software.
*
* **********************************************************************************/
using System;
using System.Collections.Generic;
using System.Text;

namespace DslEditorPowerToy.Controls.VirtualTreeGrid.Branches
{
    /// <summary>
    /// Interface for branches wishing to leverage new item placeholders
    /// </summary>
    public interface IPlaceholderBranch
    {
        /// <summary>
        /// Gets the number of visible but non placeholder items
        /// </summary>
        int NonPlaceholderItemCount
        {
            get;
        }
        /// <summary>
        /// Gets the text to display for the placeholder
        /// </summary>
        string PlaceholderText
        {
            get;
        }
        /// <summary>
        /// Creates a new item for the branch to replace placeholder
        /// </summary>
        /// <param name="insertBeforeRow"></param>
        /// <param name="primaryText"></param>
        /// <param name="validationMessage"></param>
        bool CreateNewDataItem(int insertBeforeRow, string primaryText,
            out string validationMessage);
    }
}
